#include "syscall.h"

int main()
{
	int myLock, myLock2, rv;
	PrintString("Starting clientLockTest Now...\n", sizeof("Starting clientLockTest Now...\n"));
	StartClient();
	
	PrintString("Creating myLock now.\n", sizeof("Creating myLock now.\n"));
	myLock = CreateLock("TestLock", 8);
	Print("Created myLock with the ID [%d].\n", sizeof("Created myLock with the ID [%d].\n"), myLock*10000, -1);
	
	PrintString("Creating myLock now.\n", sizeof("Creating myLock now.\n"));
	myLock2 = CreateLock("TestLock2", 9);
	Print("Created myLock with the ID [%d].\n", sizeof("Created myLock with the ID [%d].\n"), myLock2*10000, -1);
	
	PrintString("Now Acquiring myLock.\n", sizeof("Now Acquiring myLock.\n"));
	rv = AcquireLock(myLock2);
	Print("Lock acquired, acquire returned the rv [%d].\n", sizeof("Lock acquired, acquire returned the rv [%d].\n"), rv*10000, -1);
	
	PrintString("Releasing lock now.\n", sizeof("Releasing lock now.\n"));
	ReleaseLock(myLock2);
	PrintString("Lock released.\n", sizeof("Lock released.\n"));
	
	PrintString("Deleting lock now.\n", sizeof("Deleting lock now.\n"));
	DeleteLock(myLock2);
	PrintString("Lock deleted.\n", sizeof("Lock deleted.\n"));
	PrintString("Exiting clientLockTest.\n", sizeof("Exiting clientLockTest.\n"));
	
	Exit(1);
	return 1;
}
